package com.szxx.mahjong.qianjiang.service;

import com.szxx.async.handler.AsyncLogicHandleThread;
import com.szxx.mahjong.qianjiang.async.handler.QianjiangAsyncLogicHandleThread;
import com.szxx.service.impl.PlayerService;
import org.springframework.stereotype.Component;

/**
 * Created by zjh on 2017/4/26.
 */
@Component
public class QianjiangPlayerService extends PlayerService{

	/**
	 * 初始化消息处理线程
	 */
	@Override
	public void initLogicThread() {
		logicThreadList.clear();
		for(int i=0;i<logicThreadNum;i++) {
			AsyncLogicHandleThread logicThread = new QianjiangAsyncLogicHandleThread(i,systemConfigService, machineService, mahjongProcessor,this);
			logicThread.setThreadIndex(i);
			logicThread.start();
			logicThreadList.add(logicThread);
		}
	}
}
